#pragma once
#include <string>
#include <vector>
#include "ILayoutObjectCollection.h"
#include "WebKit.tlh"

#ifdef WEBAGGREGATORDLL_EXPORT
# define WEBAGGREGATORDLL_API __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define WEBAGGREGATORDLL_API __declspec (dllimport)
#endif /* Not BUILDING_DLL */

namespace WebAggregator
{
	namespace dataGrabber
	{
		// A document is a collection of layout-aware object
		class IDocument
		{
			WebKit::IDOMDocument* doc;

		private:
			int count;
			std::string Trim(std::string str);
			void RecursiveTreeTraversal(WebAggregator::dataGrabber::ILayoutObjectCollection* col, WebKit::IDOMNodePtr const & node);

		public:
			WEBAGGREGATORDLL_API void initialize(); 
			WEBAGGREGATORDLL_API void unInitialize();
			WEBAGGREGATORDLL_API void load(WebKit::IDOMDocument* document); 
			WEBAGGREGATORDLL_API ILayoutObjectCollection* getElements();
			/* additional document level api */
		};
	}
}